package com.ruoyi.shoppingcar.service;

import java.util.List;
import com.ruoyi.shoppingcar.domain.Shoppingcar;

/**
 * 购物车Service接口
 * 
 * @author ruoyi
 * @date 2024-07-22
 */
public interface IShoppingcarService 
{
    /**
     * 查询购物车
     * 
     * @param id 购物车主键
     * @return 购物车
     */
    public Shoppingcar selectShoppingcarById(Long id);

    /**
     * 查询购物车列表
     * 
     * @param shoppingcar 购物车
     * @return 购物车集合
     */
    public List<Shoppingcar> selectShoppingcarList(Shoppingcar shoppingcar);

    /**
     * 新增购物车
     * 
     * @param shoppingcar 购物车
     * @return 结果
     */
    public int insertShoppingcar(Shoppingcar shoppingcar);

    /**
     * 修改购物车
     * 
     * @param shoppingcar 购物车
     * @return 结果
     */
    public int updateShoppingcar(Shoppingcar shoppingcar);

    /**
     * 批量删除购物车
     * 
     * @param ids 需要删除的购物车主键集合
     * @return 结果
     */
    public int deleteShoppingcarByIds(Long[] ids);

    /**
     * 删除购物车信息
     * 
     * @param id 购物车主键
     * @return 结果
     */
    public int deleteShoppingcarById(Long id);
    /**
     * 将商品添加到购物车
     */
    int addDishToCart(Shoppingcar shoppingcar);
}
